package com.example.helper;

import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Component;

@Component
public class ThreadManager {

    @Async("taskExecutor")
    public void run(long time,String str){
        try {
            Thread.sleep(time);
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
        System.out.println("time = " + time+"；str = " + str);
    }
}
